<template>
  <div class="ne-container">
    <van-skeleton :row="12" :loading="loading">
      <div class="q-title">{{article.lawTitle}}</div>
      <div class="q-date">{{article.lawTime}}</div>
      <div v-html="article.lawContent"></div>
    </van-skeleton>
  </div>
</template>

<script>
  import {tbLawPropagandaList} from "../../api/tbLawPropaganda";
  import {putVideoAndImage} from "../../utils/utils";
  export default {
  name: 'wx_pages_fzbz_qmfzDetail',
    data(){
      return{
        article:{},
        loading:false
      }
    },
    methods:{
      async search(){
        const {indexCode} = this.$route.query
        if(indexCode){
          this.loading = true
          let res = await tbLawPropagandaList({indexCode})
          this.loading = false
          uni.stopPullDownRefresh()
          if(res.data && res.data.length>0){
            this.article = res.data.pop()
            this.article.lawContent = putVideoAndImage(this.article.lawContent)
          }else{
            this.article = {}
          }
        }
      }
    },
    onLoad(){
      this.search()
    }
  }
</script>
<style lang="scss" scoped>
.q-title{
  color: $uni-color-primary;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}
.q-date{
  font-size: 13px;
  color: #666666;
  margin-bottom: 10px;
}
</style>
